import React, { Component } from 'react'
import { Switch, Route, Redirect } from 'react-router-dom'
import Home from './home/Home'
import UserList from './user-manage/UserList'
import RouteList from './right-manage/RoleList'
import RightList from './right-manage/Right.list'
import NotPermission from '../NotPermission/NotPermission'
import { Layout, Menu } from 'antd';
import SideMenu from '../../components/sandbox/sideMenu'
import TopHeader from '../../components/sandbox/topHeader'
export default class NewsSandBox extends Component {
  render() {
    return (
      <Layout>
        <SideMenu></SideMenu>
        <Layout>
          <TopHeader></TopHeader>
          <Switch>
            <Route path='/home' component={Home}></Route>
            <Route path='/user-manage/list' component={UserList}></Route>
            <Route path='/right-manage/route/list' component={RouteList}></Route>
            <Route path='/right-manage/right/list' component={RightList}></Route>
            <Redirect from="/" to="/home" exact></Redirect>
            <Route path="*" component={NotPermission}></Route>
          </Switch>
        </Layout>
      </Layout>
    )
  }
}
